home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Libraries / VideoToolbox 97.08.16 / (Utilities) / ReadLuminanceMeter / LuminanceMeter.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-26  |  1.2 KB  |  59 lines  |  [TEXT/CWIE]

  1. /* luminanceMeter.h
  2.  
  3.     Include file for luminanceMeter.c code
  4.     Please send suggestions, bugs, improvements, comments to f.w.cornelissen@med.rug.nl    
  5.     Details in "read me" file and luminance.c file. Use at your own risk.
  6.  
  7.  
  8.     21-02-97    fwc        created it    
  9.  
  10. */
  11.  
  12.  
  13. #include    <stdlib.h>
  14. #include    <stdio.h>
  15. #include    <Serial.h>
  16. #include    <time.h>
  17.  
  18. #define PATIENCE                3.0            // time to wait for a message
  19. #define REQUEST_LOW_TIME        0.01         // how long is the DTR set LOW
  20. #define MESSAGE_LENGTH            11
  21.  
  22. typedef enum
  23. {
  24.     MODEM_PORT,
  25.     PRINTER_PORT
  26. } portType;
  27.  
  28. typedef enum
  29. {
  30.     OUTPUT,
  31.     INPUT
  32. } driverType;
  33.  
  34. typedef enum
  35. {
  36.     HIGH = 17,
  37.     LOW = 18
  38. } dtrType;
  39.  
  40. #define returnDriverString(p,d)     serialDriverString[p][d]
  41. #define endLuminanceMeter()            closeSerialDriver()
  42.  
  43. int     initLuminanceMeter( portType port );
  44. int     getLuminance( double *lum, char *message );
  45. char     *returnPortName( portType port );
  46.  
  47.  
  48. int openSerialDriver( portType port );
  49. int closeSerialDriver( void );
  50. int sendMeasurementRequest( void );
  51. int checkMeasurementPresent( double *t  );
  52. int configureSerialPort( void );
  53. int clearSerialBuffer( void );
  54. int setHandshakeOptions( void );
  55. int setDTR( dtrType dtr );
  56. int serialDriverStatusCheck( void );
  57. int checkSerialBuffer( void );
  58.  
  59.